﻿RegExp.prototype.Matches = function Matches(str)
{
	var result = new Array();
	if (str == null)
		str = "";
	while (str.length > 0)
	{
		var match = this.exec(str);
		if (match == null)
			break;
		result.push(match);
		str = str.substr(match.index + match[0].length);
	}
	return result;
	return new Array();
}
